package com.wzdigit.wms.basic.service.code.back;

import java.util.List;
import java.util.concurrent.CountDownLatch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.wzdigit.mes.basic.dto.StaffDTO;
import com.wzdigit.wms.basic.domain.dtos.mid.IfPostbackDto;

/**
 * WMS数据回传异常提醒【异步线程】
 * 
 * @author Administrator
 *
 */
@Service
public class BackErrorRemindThreadService {
	
	@Autowired
	private BackErrorRemindDealService backErrorRemindDealService;

	@Async("asyncPromiseExecutor")
	public void deal(IfPostbackDto backFailDto, List<StaffDTO> staffDTOList, CountDownLatch countDownLatch) {
		try {
			backErrorRemindDealService.deal(backFailDto, staffDTOList);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			countDownLatch.countDown();
		}
	}
}
